import router from './router'
import store from './store'
router.beforeEach((to, form, next) => {
  console.log(store.getters.token)
  if (store.getters.token) {
    next()
    store.commit('user/UPDATE_Active', 0)
  } else {
    next()
    if (to.path === '/user') {
      next('/login')
    }
  }
}
)
